package FileIO;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-10-19
 * Time: 20:38
 */
public class IODemo10 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("e:/IO/test.txt")){
            Scanner scanner = new Scanner(inputStream);
            //此时读取是从文件中读取数据
            scanner.next();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
